import Vue from "vue";
import Router from "vue-router";
import main from "@/components/main";
import user from "@/components/user/user";
import order from "@/components/order/order";
import notice from "@/components/notice/notice";
import custom from "@/components/custom/custom";
import commoditylists from "@/components/commoditylists/commoditylists";
import commodity from "@/components/commodity/commodity";
import register from "@/components/login/register";
import login from "@/components/login/login";
import ero from "@/components/404";

Vue.use(Router);
export default new Router({
  routes: [
    {
      path: "/",
      component: main,
      children: [
        {
          path: "/",
          component: user
        },
        {
          path: "/user",
          component: user
        },
        {
          path: "/commodity",
          component: commodity
        },
        ,
        {
          path: "/order",
          component: order
        },
        {
          path: "/notice",
          component: notice
        },
        {
          path: "/commoditylists",
          component: commoditylists
        },
        {
          path: "/custom",
          component: custom
        }
      ]
    },
    {
      path: "/login",
      component: login
    },
    {
      path: "/register",
      component: register
    },
    {
      path: "/404",
      component: ero
    }
  ]
});
